<template>
<!--  后台管理首页侧边栏-->
  <div>
    <el-menu
      style="width: 200px; min-height: calc(100vh - 50px)"
      active-text-color="#ffd04b"
      background-color="#545c64"
      class="el-menu-vertical-demo"
      default-active="2"
      text-color="#fff"
      @open="handleOpen"
      @close="handleClose"
    >
      <el-menu-item index="2" @click="toHome">
        <el-icon><icon-menu /></el-icon>
        <span>用户管理</span>
      </el-menu-item>
      <el-menu-item index="3" @click="toCourseManage">
        <el-icon><document /></el-icon>
        <span>课程管理</span>
      </el-menu-item>
      <el-menu-item index="4" @click="toUserPurchase">
        <el-icon><setting /></el-icon>
        <span>用户购买记录</span>
      </el-menu-item>
      <el-menu-item index="5" @click="toUserLogManage">
        <el-icon><setting /></el-icon>
        <span>用户浏览日志管理</span>
      </el-menu-item>

      <el-menu-item index="6" @click="toCourseCounter">
        <el-icon><setting /></el-icon>
        <span>课程购买总览</span>
      </el-menu-item>
      <el-menu-item index="7" @click="toMessageManage">
        <el-icon><setting /></el-icon>
        <span>查看和修改信息</span>
      </el-menu-item>

      <el-menu-item index="8" @click="toPasswordChange">
        <el-icon><setting /></el-icon>
        <span>密码修改</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "Aside",
  methods: {
    toHome() {
      this.$router.push({ path: "/Home" });
    },
    toCourseManage() {
      this.$router.push({ path: "/courseManage" });
    },
    toUserPurchase() {
      this.$router.push({ path: "/userPurchase" });
    },
    toUserLogManage() {
      this.$router.push({ path: "/userLogManage" });
    },
    toMessageManage() {
      this.$router.push({ path: "/MessageManage" });
    },
    toPasswordChange() {
      this.$router.push({ path: "/PasswordChange" });
    },
    toCourseCounter() {
      this.$router.push({ path: "/courseCounter" });
    },
  },
};
</script>

<style scoped></style>
